# An external project for GLEW, The OpenGL Extension Wrangler Library http://glew.sourceforge.net/

ExternalProject_Add( GLEW
	URL ${CMAKE_SOURCE_DIR}/glew-2.1.0.tgz
	DOWNLOAD_EXTRACT_TIMESTAMP TRUE
	SOURCE_SUBDIR "build/cmake"
	CMAKE_ARGS
		-DBUILD_SHARED_LIBS:BOOL=OFF
		-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
		-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
		-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
		-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
		-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
		-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
)
ExternalProject_Get_Property( GLEW INSTALL_DIR )
SET( GLEW_INSTALL_DIR ${INSTALL_DIR} )
